
//
// 101225 - AH - Created.
//

package org.soekrat.gui.swing;

import static javax.swing.JOptionPane.showMessageDialog;

import java.awt.Component;

import javax.swing.JOptionPane;

/**
 * <p>
 *   Swing utilities for the Soekrat system.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC) 
 */
public final class SoekratSwingUtil 
{
  private SoekratSwingUtil(){} // Utility pattern dictates private constructor.
  
  /**
   * <p>
   *   Shows to end user an message telling error done in some input.
   * </p>
   * @param c   {@link Component} error was done in.
   * @param msg Error message.
   */
  public static void showUserInputErrDlg(Component c, String msg)
  {
    if (msg==null)
    {
      throw new NullPointerException("msg");
    }
    
    showMessageDialog(c, msg, "Error in input", JOptionPane.ERROR_MESSAGE);
  }
  
}
